package j09;

/**
 * @author chengshuai
 * @date 2021/5/4 23:20
 */
public class ReEnterLockDemo {

    static Object object = new Object();
    public static void m1() {
        new Thread(()-> {
            synchronized (object) {
                System.out.println("外层");
                synchronized (object) {
                    System.out.println("中层");
                    synchronized (object) {
                        System.out.println("内层");
                    }
                }
            }
        }, "t1").start();
    }
    public static void main(String[] args) {
        m1();
    }
}
